<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.sailorj.medical.domain.family_member.Family_member" %>
<%@ page import="com.sailorj.medical.domain.ill_card.Ill_card" %>
<%@ include file="/common/base.jsp"%>
<%
 String id=request.getParameter("id");
System.out.println("在bxRecord  JSP 的servlet的id="+id);
 //根据区域编号加载实例
 Ill_cardDao ill_cardDao = new Ill_cardDao();
 PolicyDao policyDao = new PolicyDao();
 Family_member model=new Family_member(id,id);
 List<Ill_card> list2 = ill_cardDao.findByKeyValue("IDcard", id);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="stylesheet" type="text/css" href="css/admin.css">

<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/admin.js"></script>
<script src="other/layui/layui.all.js"></script>
<link rel="stylesheet" href="other/layui/css/layui.css">
<script type="text/javascript">
	$(document).ready(function() {
		//重新绑定表单提交
		$("#add_btn").bind("click", function() {
			$('form').submit();
		});
	});
</script>

</head>
<%
	String userid = session.getAttribute("userid").toString();
%>
<body>

	<div class="panel admin-panel">
		<div class="panel-head" id="add">
			<strong><span class="icon-pencil-square-o"></span>修改家庭档案信息</strong>
		</div>
		<div class="body-content">
			<form id="form-add" method="post" class="form-x"
				action="<%=path%>/system/FamilyServlet?m=edit">
				
				<div class="form-group">
					<div class="label">
						<label>姓名:</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=model.getMembername()%>" name="areacode"/>

						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>身份证:</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=model.getIDcard() %>" name="familycode" readonly="readonly" />

						<div class="tips"></div>
					</div>

				</div>
				
				<div class="form-group">
					<div class="label">
						<label>疾病名称:</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="familycode" list="family" id=""/>
						<datalist id="family" class="selectDate" aria-invalid="false"> 
							<%
						  for(Ill_card m:list2){ 
						
						  %>
							<option value="<%=m.getIll_code()%>"><%=m.getChronicdis().getIllname()%></option>
							<%} %>

						</datalist >

						<div class="tips"></div>
					</div>

				</div>
				
				<div class="form-group">
					<div class="label">
						<label>登记员:</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=userid %>" name="userid"
							data-validate="required:请输入登记员" readonly="readonly"/>
						<div class="tips"></div>
					</div>

				</div>
				
				<div class="form-group">
					<div class="label">
						<label>就诊时间:</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="vis_time" id="vis_time" />
						<div class="tips"></div>
					</div>

				</div>
				
				<div class="form-group">
					<div class="label">
						<label>总费用:</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="vis_time" id="vis_time" />
						<div class="tips"></div>
					</div>

				</div>
				
				<div class="form-group">
					<div class="label">
						<label>报销金额:</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="vis_time" id="vis_time" />
						<div class="tips"></div>
					</div>

				</div>
				
				<div class="form-group">
					<div class="label">
						<label>就诊机构:</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="vis_time" id="vis_time" />
						<div class="tips"></div>
					</div>

				</div>
				
				<div class="form-group">
					<div class="label">
						<label>地区编号:</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="vis_time" id="vis_time" />
						<div class="tips"></div>
					</div>

				</div>
					<input type="text" name="rate" class="rate" id="rate" value="<%=policyDao.findByYear().get(0).getRate() %>" />
					<input type="text" name="Max_line" class="Max_line" id="Max_line" value="<%=policyDao.findByYear().get(0).getMax_line() %>" />

				<div class="form-group">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button id="add_btn" class="button bg-main icon-check-square-o" type="button">提交</button>
						<button class="button bg-red icon-share-square-o" type="button" onclick="window.history.go(-1)">返回</button>
					</div>
				</div>
			</form>
		</div>
	</div>
<script>
layui.use('laydate', function(){
  var laydate = layui.laydate;
  
  //执行一个laydate实例
  laydate.render({
    elem: '#vis_time' //指定元素
    ,value: '${tbPoltVote.voteendTime}'
    ,type: 'datetime'
    ,isInitValue: true
  });
});
</script>
</body>
</html>
